Skip to content

Fix R8 minify task by adding jsoup classes to proguard file#13038

Merged
TobiGr merged 1 commit intoTeamNewPipe:masterfrom
TobiGr:fix/minify
Jan 11, 2026
Merged

Fix R8 minify task by adding jsoup classes to proguard file#13038
TobiGr merged 1 commit intoTeamNewPipe:masterfrom
TobiGr:fix/minify

Conversation

@TobiGr
Copy link
Copy Markdown
Contributor

@TobiGr TobiGr commented Jan 11, 2026

What is it?

  • Bugfix (user facing)*

Description of the changes in your PR

Question for the reviewer: Do I also need to add -keep class org.jsoup.helper.Re2jRegex { *; } to the file?

This fixes the following error during the minifyWithR8 task:

> Task :app:minifyReleaseWithR8 FAILED
ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /home/runner/work/NewPipe/NewPipe/app/build/outputs/mapping/release/missing_rules.txt.
ERROR: R8: Missing class com.google.re2j.Matcher (referenced from: com.google.re2j.Matcher org.jsoup.helper.Re2jRegex$Re2jMatcher.delegate and 3 other contexts)
Missing class com.google.re2j.Pattern (referenced from: com.google.re2j.Pattern org.jsoup.helper.Re2jRegex.re2jPattern and 4 other contexts)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions Bot added the size/small PRs with less than 50 changed lines label Jan 11, 2026
@Stypox
Copy link
Copy Markdown
Member

Stypox commented Jan 11, 2026

I found jhy/jsoup#2459

# Ignore intended-to-be-optional re2j classes - only needed if using re2j for jsoup regex
# jsoup safely falls back to JDK regex if re2j not on classpath, but has concrete re2j refs
# See https://github.com/jhy/jsoup/issues/2459 - may be resolved in future, then this may be removed
-dontwarn com.google.re2j.**

@TobiGr TobiGr marked this pull request as ready for review January 11, 2026 20:54
This fixes the following error during the minifyWithR8 task:

> Task :app:minifyReleaseWithR8 FAILED
ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /home/runner/work/NewPipe/NewPipe/app/build/outputs/mapping/release/missing_rules.txt.
ERROR: R8: Missing class com.google.re2j.Matcher (referenced from: com.google.re2j.Matcher org.jsoup.helper.Re2jRegex$Re2jMatcher.delegate and 3 other contexts)
Missing class com.google.re2j.Pattern (referenced from: com.google.re2j.Pattern org.jsoup.helper.Re2jRegex.re2jPattern and 4 other contexts)
@TobiGr TobiGr merged commit b892318 into TeamNewPipe:master Jan 11, 2026
5 checks passed
@TobiGr TobiGr deleted the fix/minify branch January 11, 2026 21:17
@ShareASmile ShareASmile added bug Issue is related to a bug dependency Issues and PRs related to dependencies labels Jan 26, 2026
@ShareASmile ShareASmile mentioned this pull request Jan 26, 2026
4 tasks
TobiGr added a commit to TobiGr/NewPipe that referenced this pull request Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is related to a bug dependency Issues and PRs related to dependencies size/small PRs with less than 50 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants